package org.example.managere.entity.feibiao;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;

/**
 * 知识图谱实体类 - 电机向量知识库
 */
@Entity
@Table(name = "am_knowledge_entity")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AmKnowledgeEntity {
    @Id
    @Column(name = "entity_id", length = 10, nullable = false)
    private String entityId;
    
    @Column(name = "entity_name", length = 50, nullable = false, unique = true)
    private String entityName;
    
    @Column(name = "entity_type", length = 50, nullable = false)
    private String entityType;
    
    @Column(name = "entry_time", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    private Date entryTime;
    
    @PrePersist
    public void prePersist() {
        this.entryTime = new Date();
    }
} 